Skip to content

Latest commit

 

History

History
87 lines (53 loc) · 2.3 KB

File metadata and controls

87 lines (53 loc) · 2.3 KB
uid
NetCode.Data.Origins

[!include]

<style>.context-box-summary .data-all, .context-box-summary .prepare-all { visibility: visible; } </style>

Where Data Comes From

From a developer perspective you have three kinds of Data:

  1. App Data
  2. Instance Data
  3. Code Retrieved Data

In addition you have Settings and Resources:

  1. Configuration & Settings
  2. Resources

And you have Context information:

  • MyContext / CmsContext
  • MyPage
  • MyUser
  • MyView
  • etc.

App Data

The complete App Data is always available in these objects:

[!include""]

Instance Data

[!include""]

If the View is configured for manual content-editing or uses a Query then Instance Data is automatically prepared in these objects:

[!include""]

Code Retrieved Data

Your code can also retrieve data using normal C# code to do things like

  1. Get lists of files from ADAM or the file system
  2. Read data from SQL
  3. Manually parse CSV files or access external Web Services
  4. Use DataSources to get SQL, CSV or other data

Configuration and Settings

Configuration is usually found on specific objects which are configured. There are three types:

  1. View Configuration
  2. App Configuration
  3. Feature activations

Settings usually affect templates / Razor or C# WebAPIs. They are usually configured at various levels like on the View, App, Site or Global.

C# code will usually get these settings from the Settings object which consolidates all the settings.

👉 See Settings

Resources

Resources are meant to provide translated labels, logos etc. You can configure them at View, App, Site or Global level.

👉 See Resources


History

  1. Introduced in 2sxc v1
  2. App.Data added ca. 2sxc 6
  3. App.Query added ca. 2sxc 7
  4. Settings and Resources added in 2sxc 12